package chapter11;


import java.util.LinkedList;

/**
 * @author : DuJiabao
 * @Date : 2021/2/19 19:37
 * @Project : thinking-in-java
 * @File : null.java
 * @Desc :
 */
public class Stack<T> {
  private LinkedList<T> stack = new LinkedList<>();
  public void push(T v) { stack.addFirst(v); }
  public T pop() { return stack.removeFirst(); }
  public T peek() { return stack.peek(); }
  public boolean isEmpty() { return stack.isEmpty(); }
}
